package com.hqd.utils.file.filter;

import com.hqd.utils.file.SimpleFileUtils;

import java.io.FileFilter;

/**
 * 文件名称过滤器
 */
public class FileNameContainFilter implements FileFilter {
    private String searchName;

    public FileNameContainFilter(String searchName) {
        this.searchName = searchName;
    }

    @Override
    public boolean accept(java.io.File pathname) {
        return SimpleFileUtils.fileNameContainsStr(pathname, searchName, false);
    }
}